package com.ymatou.iapi.userservice.service;

import org.json.JSONObject;

import com.ymatou.iapi.userservice.parameter.AddressRequestDtoBean;
import com.ymatou.iapi.userservice.parameter.resp.GetOneResult;
import com.ymatou.query.seller.trading.api.parameter.ExistsResponse;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymt.core.tool.Logger;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;

/**
 * 修改登入账户信息Call FreeMaker Template自动生成代码
 */
public class GetOneCall extends YmatouBaseCall {
	private static String opurl = "userext/address/getone";

	public GetOneCall() {
//		super(EnvSetup.getSystemUrl("api_userservice"), opurl, "POST", "JSON");
		super(EnvSetup.getSystemUrl("userservice_iapi"),opurl,"POST","JSON");
	}

	@Override
	public void addDefHeader() {
		client.addHeader("Accept", "text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public GetOneResult getResult() {
		GetOneResult addr = null;
		try {
			String re=getString("Result");
			addr = (GetOneResult) FormatUtil	.GSONToObject(re,GetOneResult.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return addr;
	}
}